package gemini.basic.model;

// default package
// Generated Nov 23, 2010 4:23:01 PM by Hibernate Tools 3.4.0.Beta1

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 * MonthlyPoint generated by hbm2java
 */
@Entity
@Table(name = "g_mothly_point", catalog = "gemini")
public class MonthlyPoint extends AbstractDomain implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer id;
	private Integer version;
	private Distributor distributor;
	private Month month;
	private Integer personalPoint;
	private Integer groupPoint;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Version
	@Column(name = "version")
	public Integer getVersion() {
		return this.version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "distributor_id", nullable = false)
	public Distributor getDistributor() {
		return this.distributor;
	}

	public void setDistributor(Distributor distributor) {
		this.distributor = distributor;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "month_id", nullable = false)
	public Month getMonth() {
		return this.month;
	}

	public void setMonth(Month month) {
		this.month = month;
	}

	@Column(name = "personal_point", nullable = false)
	public Integer getPersonalPoint() {
		return this.personalPoint;
	}

	public void setPersonalPoint(Integer personalPoint) {
		this.personalPoint = personalPoint;
	}
	
	@Column(name = "group_point", nullable = false)
	public Integer getGroupPoint() {
		return this.groupPoint;
	}

	public void setGroupPoint(Integer groupPoint) {
		this.groupPoint = groupPoint;
	}
}
